linere = new RegExp("^[^\\r\\n]+$", "igm");
str="<li><a\s+href=\"(\/htm2\/[^<>]+\.htm)\"\r\n<li><a\s+href=\"(\/htm3\/[^<>]+\.htm)\"\r\n<li><a\s+href=\"(\/htm\/[^<>]+\.htm)\"";
while ((line = linere.exec(str)) != null) {
    console.log(">>>"+line[0]);
}